#pragma once

#include "View.h"
//#include "IShockwaveFlash.h"
#include "FlashSite.h"
#include "flash10b.tlh"

class FlashView : public View
{
public:
	FlashView();
	virtual ~FlashView();
	
	bool LoadMovie(const wchar_t *pFile);
	void Update(LPCRECT pRect);

protected:
	void Render(HDC hdc, const RECT *lpRect);
	
	BOOL FlashVerCheck();
	BOOL GetFileVersion(LPCTSTR szFileName, DWORD &dwMS, DWORD &dwLS);
	LONG GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata);

private:
	CComPtr<ShockwaveFlashObjects::IShockwaveFlash> m_flashObj;
	CComPtr<IOleObject>	m_oleObj;
	CComPtr<IOleInPlaceObjectWindowless> m_windowlessObj;
	FlashSite* m_pSite;
	DWORD m_dwLS;
	DWORD m_dwMS;
	bool  m_bInvailRect;
};